home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-29 | 37.1 KB | 1,351 lines |
- (*************************************************************************
-
- $RCSfile: Datatypes.mod $
- Description: Interface to datatypes.
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.7 $
- $Author: fjc $
- $Date: 1995/06/04 23:13:14 $
-
- Includes Release 40.15
-
- (C) Copyright 1991-1993 Commodore-Amiga, Inc.
- All Rights Reserved
-
- Oberon-A Interface Copyright © 1994-1995, Frank Copeland.
- This file is part of the Oberon-A Interface.
- See Oberon-A.doc for conditions of use and distribution.
-
- *************************************************************************)
-
- <* STANDARD- *>
-
- MODULE [2] Datatypes;
-
- IMPORT
- SYS := SYSTEM, Kernel, e := Exec, u := Utility, d := Dos,
- gfx := Graphics, p := Printer, IFF := IFFParse, i := Intuition,
- s := Sets;
-
- (*
- ** Declare pointer types.
- *)
-
- TYPE
-
- DataTypeHeaderPtr * = POINTER TO DataTypeHeader;
- HookContextPtr * = POINTER TO HookContext;
- ToolPtr * = POINTER TO Tool;
- DataTypePtr * = POINTER TO DataType;
- ToolNodePtr * = POINTER TO ToolNode;
- SpecialInfoPtr * = POINTER TO SpecialInfo;
- MethodPtr * = POINTER TO Method;
- FrameInfoPtr * = POINTER TO FrameInfo;
- LinePtr * = POINTER TO Line;
- BitMapHeaderPtr * = POINTER TO BitMapHeader;
- ColorRegisterPtr * = POINTER TO ColorRegister;
- VoiceHeaderPtr * = POINTER TO VoiceHeader;
- AnimHeaderPtr * = POINTER TO AnimHeader;
-
-
- (*
- ** $VER: datatypes.h 39.6 (22.4.93)
- *)
-
- (*****************************************************************************)
-
- CONST
-
- idDTYP * = 044545950H; (* MAKE_ID('D','T','Y','P') *)
-
- (*****************************************************************************)
-
- CONST
-
- idDTHD * = 044544844H; (* MAKE_ID('D','T','H','D') *)
-
- TYPE
-
- MaskPtr * = POINTER TO ARRAY 1 OF INTEGER;
- (* Really should be:
- MaskPtr * = POINTER TO RECORD
- b : BOOLEAN;
- c : SYS.BYTE;
- END; (* MaskPtr *)
- *)
-
- DataTypeHeader * = RECORD
- name * : e.LSTRPTR; (* Descriptive name of the data type *)
- baseName * : e.LSTRPTR; (* Base name of the data type *)
- pattern * : e.LSTRPTR; (* Match pattern for file name. *)
- mask * : MaskPtr; (* Comparision mask *)
- groupID * : e.ULONG; (* Group that the DataType is in *)
- id * : e.ULONG; (* ID for DataType (same as IFF FORM type) *)
- maskLen * : INTEGER; (* Length of comparision mask *)
- pad * : INTEGER; (* Unused at present (must be 0) *)
- flags * : s.SET16; (* Flags *)
- priority * : e.UWORD; (* Priority *)
- END;
-
- (*****************************************************************************)
-
- CONST
- hSize *= SIZE(DataTypeHeader);
-
- (* Basic type *)
- typeMaskSet * = {0..7};
- typeMask * = 0000FH;
- binary * = 00000H;
- ascii * = 00001H;
- iff * = 00002H;
- misc * = 00003H;
-
- (* Set if case is important *)
- case * = 00010H;
-
- (* Reserved for system use *)
- system1 * = 01000H;
-
- (*****************************************************************************
- *
- * GROUP ID and ID
- *
- * This is used for filtering out objects that you don't want. For
- * example, you could make a filter for the ASL file requester so
- * that it only showed the files that were pictures, or even to
- * narrow it down to only show files that were ILBM pictures.
- *
- * Note that the Group ID's are in lower case, and always the first
- * four characters of the word.
- *
- * For ID's; If it is an IFF file, then the ID is the same as the
- * FORM type. If it isn't an IFF file, then the ID would be the
- * first four characters of name for the file type.
- *
- *****************************************************************************)
-
- CONST
-
- (* System file, such as; directory, executable, library, device, font, etc. *)
- system * = 073797374H; (* MAKE_ID ('s','y','s','t') *)
-
- (* Formatted or unformatted text *)
- text * = 074657874H; (* MAKE_ID ('t','e','x','t') *)
-
- (* Formatted text with graphics or other DataTypes *)
- document * = 0646F6375H; (* MAKE_ID ('d','o','c','u') *)
-
- (* Sound *)
- sound * = 0736F756EH; (* MAKE_ID ('s','o','u','n') *)
-
- (* Musical instruments used for musical scores *)
- instrument * = 0696E7374H; (* MAKE_ID ('i','n','s','t') *)
-
- (* Musical score *)
- music * = 06D757369H; (* MAKE_ID ('m','u','s','i') *)
-
- (* Still picture *)
- picture * = 070696374H; (* MAKE_ID ('p','i','c','t') *)
-
- (* Animated picture *)
- animation * = 0616E696DH; (* MAKE_ID ('a','n','i','m') *)
-
- (* Animation with audio track *)
- movie * = 06D6F7669H; (* MAKE_ID ('m','o','v','i') *)
-
- (*****************************************************************************)
-
- CONST
-
- (* A code chunk contains an embedded executable that can be loaded
- * with InternalLoadSeg. *)
- idCode * = 044544344H; (* MAKE_ID('D','T','C','D') *)
-
- TYPE
-
- (* DataTypes comparision hook context (Read-Only). This is the
- * argument that is passed to a custom comparision routine. *)
-
- HookContext * = RECORD
- (* Libraries that are already opened for your use *)
- sysBase - : e.LibraryPtr;
- dosBase - : d.DosLibraryPtr;
- iffParseBase - : e.LibraryPtr;
- utilityBase - : u.UtilityBasePtr;
-
- (* File context *)
- lock - : d.FileLockPtr; (* Lock on the file *)
- fib - : d.FileInfoBlockPtr; (* Pointer to a FileInfoBlock *)
- fileHandle - : d.FileHandlePtr; (* Pointer to the file handle (may be NULL) *)
- iff - : IFF.IFFHandlePtr; (* Pointer to an IFFHandle (may be NULL) *)
- buffer - : e.LSTRPTR; (* Buffer *)
- bufferLength - : e.ULONG; (* Length of the buffer *)
- END;
-
- (*****************************************************************************)
-
- CONST
-
- idTool * = 04454544CH; (* MAKE_ID('D','T','T','L'); *)
-
- TYPE
-
- Tool * = RECORD
- which * : e.UWORD; (* Which tool is this *)
- flags * : s.SET16; (* Flags *)
- program * : e.LSTRPTR; (* Application to use *)
- END;
-
- CONST
- tSize *= SIZE(Tool);
-
- (* defines for tn_Which *)
- info * = 1;
- browse * = 2;
- edit * = 3;
- print * = 4;
- mail * = 5;
-
- (* defines for tn_Flags *)
- launchMaskSet * = {0..7};
- launchMask * = 0000FH;
- shell * = 00001H;
- workbench * = 00002H;
- rx * = 00003H;
-
- (*****************************************************************************)
-
- CONST
-
- idTags * = 044545447H; (* MAKE_ID('D','T','T','G'); *)
-
- (*****************************************************************************)
-
- TYPE
-
- DataType * = RECORD
- node1 * : e.Node; (* Reserved for system use *)
- node2 * : e.Node; (* Reserved for system use *)
- header * : DataTypeHeaderPtr; (* Pointer to the DataTypeHeader *)
- toolList * : e.List; (* List of tool nodes *)
- functionName * : e.LSTRPTR; (* Name of comparision routine *)
- attrList * : u.TagListPtr; (* Object creation tags *)
- length * : e.ULONG; (* Length of the memory block *)
- END;
-
- CONST
-
- nSize *= SIZE(DataType);
-
- (*****************************************************************************)
-
- TYPE
-
- ToolNode * = RECORD (e.NodeBase)
- node * : e.Node; (* Embedded node *)
- tool * : Tool; (* Embedded tool *)
- length * : e.ULONG; (* Length of the memory block *)
- END;
-
- CONST
-
- tnSize *= SIZE(ToolNode);
-
- (*****************************************************************************)
-
- CONST
-
- idNAME * = 04E414D45H; (* MAKE_ID('N','A','M','E') *)
-
- (*****************************************************************************)
-
- CONST
-
- (* text ID's *)
- errorUnknownDatatype * = 2000;
- errorCouldntSave * = 2001;
- errorCouldntOpen * = 2002;
- errorCouldntSendMessage * = 2003;
-
- (* new for V40 *)
- errorCouldntOpenClipboard * = 2004;
- errorReserved * = 2005;
- errorUnknownCompression * = 2006;
- errorNotEnoughData * = 2007;
- errorInvalidData * = 2008;
-
- (* Offset for types *)
- msgTypeOffset * = 2100;
-
- (*****************************************************************************)
-
- (*
- ** $VER: datatypesclass.h 39.8 (17.3.93)
- **
- ** Interface definitions for DataType objects.
- *)
-
- (*****************************************************************************)
-
- CONST
-
- dataTypesClass * = "datatypesclass";
-
- (*****************************************************************************)
-
- CONST
-
- aDummy * = u.user + 01000H;
-
- (* Generic attributes *)
- textAttr * = aDummy+10;
- (* (struct TextAttr * ) Pointer to the default TextAttr to use for
- * the text within the object. *)
-
- topVert * = aDummy+11;
- (* (LONG) Current top vertical unit *)
-
- visibleVert * = aDummy+12;
- (* (LONG) Number of visible vertical units *)
-
- totalVert * = aDummy+13;
- (* (LONG) Total number of vertical units *)
-
- vertUnit * = aDummy+14;
- (* (LONG) Number of pixels per vertical unit *)
-
- topHoriz * = aDummy+15;
- (* (LONG) Current top horizontal unit *)
-
- visibleHoriz * = aDummy+16;
- (* (LONG) Number of visible horizontal units *)
-
- totalHoriz * = aDummy+17;
- (* (LONG) Total number of horizontal units *)
-
- horizUnit * = aDummy+18;
- (* (LONG) Number of pixels per horizontal unit *)
-
- nodeName * = aDummy+19;
- (* (UBYTE * ) Name of the current element within the object. *)
-
- title * = aDummy+20;
- (* (UBYTE * ) Title of the object. *)
-
- triggerMethods * = aDummy+21;
- (* (struct DTMethod * ) Pointer to a NULL terminated array of
- * supported trigger methods. *)
-
- data * = aDummy+22;
- (* (APTR) Object specific data. *)
-
- textFont * = aDummy+23;
- (* (struct TextFont * ) Default font to use for text within the
- * object. *)
-
- methods * = aDummy+24;
- (* (ULONG * ) Pointer to a ~0 terminated array of supported
- * methods. *)
-
- printerStatus * = aDummy+25;
- (* (LONG) Printer error message. Error numbers are defined in
- * <devices/printer.h> *)
-
- printerProc * = aDummy+26;
- (* PRIVATE (struct Process * ) Pointer to the print process. *)
-
- layoutProc * = aDummy+27;
- (* PRIVATE (struct Process * ) Pointer to the layout process. *)
-
- busy * = aDummy+28;
- (* Used to turn the applications' busy pointer off and on *)
-
- sync * = aDummy+29;
- (* Used to indicate that new information has been loaded into
- * an object. This is for models that cache the DTA_TopVert-
- * like tags *)
-
- baseName * = aDummy+30;
- (* The base name of the class *)
-
- groupID * = aDummy+31;
- (* Group that the object must belong in *)
-
- errorLevel * = aDummy+32;
- (* Error level *)
-
- errorNumber * = aDummy+33;
- (* datatypes.library error number *)
-
- errorString * = aDummy+34;
- (* Argument for datatypes.library error *)
-
- conductor * = aDummy+35;
- (* New for V40. (UBYTE * ) specifies the name of the
- * realtime.library conductor. Defaults to "Main". *)
-
- controlPanel * = aDummy+36;
- (* New for V40. (BOOL) Indicate whether a control panel should be
- * embedded within the object (in the animation datatype, for
- * example). Defaults to TRUe. *)
-
- immediate * = aDummy+37;
- (* New for V40. (BOOL) Indicate whether the object should
- * immediately begin playing. Defaults to FALSe. *)
-
- repeat * = aDummy+38;
- (* New for V40. (BOOL) Indicate that the object should repeat
- * playing. Defaults to FALSe. *)
-
-
- (* DTObject attributes *)
- name * = aDummy+100;
- sourceType * = aDummy+101;
- handle * = aDummy+102;
- dataType * = aDummy+103;
- domain * = aDummy+104;
-
- (* DON'T USE THE FOLLOWING FOUR TAGS. USE THE CORRESPONDING TAGS IN
- * <intuition/gadgetclass.h> *)
- left * = aDummy+105;
- top * = aDummy+106;
- width * = aDummy+107;
- height * = aDummy+108;
-
- objName * = aDummy+109;
- objAuthor * = aDummy+110;
- objAnnotation * = aDummy+111;
- objCopyright * = aDummy+112;
- objVersion * = aDummy+113;
- objectID * = aDummy+114;
- userData * = aDummy+115;
- frameInfo * = aDummy+116;
-
- (* DON'T USE THE FOLLOWING FOUR TAGS. USE THE CORRESPONDING TAGS IN
- * <intuition/gadgetclass.h> *)
- relRight * = aDummy+117;
- relBottom * = aDummy+118;
- relWidth * = aDummy+119;
- relHeight * = aDummy+120;
-
- selectDomain * = aDummy+121;
- totalPVert * = aDummy+122;
- totalPHoriz * = aDummy+123;
- nominalVert * = aDummy+124;
- nominalHoriz * = aDummy+125;
-
- (* Printing attributes *)
- destCols * = aDummy+400;
- (* (LONG) Destination X width *)
-
- destRows * = aDummy+401;
- (* (LONG) Destination Y height *)
-
- special * = aDummy+402;
- (* (UWORD) Option flags *)
-
- rastPort * = aDummy+403;
- (* (struct RastPort * ) RastPort to use when printing. (V40) *)
-
- arexxPortName * = aDummy+404;
- (* (STRPTR) Pointer to base name for ARexx port (V40) *)
-
-
- (*****************************************************************************)
-
- stRam * = 1;
- stFile * = 2;
- stClipboard * = 3;
- stHotlink * = 4;
-
- (*****************************************************************************)
-
- TYPE
-
- (* Attached to the Gadget.SpecialInfo field of the gadget. Don't access directly,
- * use the Get/Set calls instead.
- *)
- SpecialInfo * = RECORD
- lock * : e.SignalSemaphore; (* Locked while in DoAsyncLayout() *)
- flags * : s.SET32;
-
- topVert * : LONGINT; (* Top row (in units) *)
- visVert * : LONGINT; (* Number of visible rows (in units) *)
- totVert * : LONGINT; (* Total number of rows (in units) *)
- oTopVert * : LONGINT; (* Previous top (in units) *)
- vertUnit * : LONGINT; (* Number of pixels in vertical unit *)
-
- topHoriz * : LONGINT; (* Top column (in units) *)
- visHoriz * : LONGINT; (* Number of visible columns (in units) *)
- totHoriz * : LONGINT; (* Total number of columns (in units) *)
- oTopHoriz * : LONGINT; (* Previous top (in units) *)
- horizUnit * : LONGINT; (* Number of pixels in horizontal unit *)
- END;
-
- CONST
-
- (* Object is in layout processing *)
- layout * = 0;
-
- (* Object needs to be layed out *)
- newSize * = 1;
-
- dragging * = 2;
- dragSelect * = 3;
-
- highlight * = 4;
-
- (* Object is being printed *)
- printing * = 5;
-
- (* Object is in layout process *)
- sifLayoutProc * = 6;
-
- (*****************************************************************************)
-
- TYPE
-
- Method * = RECORD
- label * : e.LSTRPTR;
- command * : e.LSTRPTR;
- method * : e.ULONG;
- END;
-
- (*****************************************************************************)
-
- CONST
-
- mDummy * = 0600H;
-
- (* Inquire what environment an object requires *)
- mFrameBox * = 0601H;
-
- (* Same as GM_LAYOUT except guaranteed to be on a process already *)
- mProcLayout * = 0602H;
-
- (* Layout that is occurring on a process *)
- mASyncLayout * = 0603H;
-
- (* When a RemoveDTObject() is called *)
- mRemoveDTObject * = 0604H;
-
- mSelect * = 0605H;
- mClearSelected * = 0606H;
-
- mCopy * = 0607H;
- mPrint * = 0608H;
- mAbortPrint * = 0609H;
-
- mNewMember * = 0610H;
- mDisposeMember * = 0611H;
-
- mGoto * = 0630H;
- mTrigger * = 0631H;
-
- mObtainDrawInfo * = 0640H;
- mDraw * = 0641H;
- mReleaseDrawInfo * = 0642H;
-
- mWrite * = 0650H;
-
- TYPE
- (* Used to ask the object about itself *)
- Dimensions *= RECORD (* used by the following type *)
- width *: LONGINT;
- height *: LONGINT;
- depth *: LONGINT;
- END;
-
- FrameInfo * = RECORD
- propertyFlags * : LONGINT; (* DisplayInfo (graphics/displayinfo.h) *)
- resolution * : gfx.Point; (* DisplayInfo *)
-
- redBits * : e.UBYTE;
- greenBits * : e.UBYTE;
- blueBits * : e.UBYTE;
-
- dimensions * : Dimensions;
-
- screen * : i.ScreenPtr;
- colorMap * : gfx.ColorMapPtr;
-
- flags * : s.SET32;
- END;
-
- CONST
-
- scalable * = 1;
- scrollable * = 2;
- remappable * = 4;
-
- TYPE
-
- (* DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT *)
- General * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- END;
-
- (* DTM_SELECT *)
- Select * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- select * : gfx.Rectangle;
- END;
-
- (* DTM_FRAMEBOX *)
- FrameBox * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- contentsInfo * : FrameInfoPtr; (* Input *)
- frameInfo * : FrameInfoPtr; (* Output *)
- sizeFrameInfo * : e.ULONG;
- frameFlags * : s.SET32;
- END;
-
- CONST
-
- framefSpecify * = 0; (* Make do with the dimensions of FrameBox provided. *)
-
- TYPE
-
- (* DTM_GOTO *)
- Goto * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- nodeName * : e.LSTRPTR; (* Node to goto *)
- attrList * : u.TagListPtr; (* Additional attributes *)
- END;
-
- (* DTM_TRIGGER *)
- Trigger * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- function * : e.ULONG;
- data * : e.APTR;
- END;
-
- CONST
-
- pause * = 1;
- play * = 2;
- contents * = 3;
- index * = 4;
- retrace * = 5;
- browsePrev * = 6;
- browseNext * = 7;
-
- nextField * = 8;
- prevField * = 9;
- activateField * = 10;
-
- command * = 11;
-
- (* New for V40 *)
- rewind * = 12;
- fastForward * = 13;
- stop * = 14;
- resume * = 15;
- locate * = 16;
-
- TYPE
-
- (* DTM_PRINT *)
- PrintStd * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- ios * : e.IOStdReqPtr;
- attrList * : u.TagListPtr;
- END;
-
- PrintDRP * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- iodrp * : p.IODRPReqPtr;
- attrList * : u.TagListPtr;
- END;
-
- PrintPrtCmd * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr;
- iopc * : p.IOPrtCmdReqPtr;
- attrList * : u.TagListPtr;
- END;
-
- (* DTM_DRAW *)
- Draw * = RECORD (i.MsgBase)
- msg * : i.Msg;
- rPort * : gfx.RastPortPtr;
- left * : LONGINT;
- top * : LONGINT;
- width * : LONGINT;
- height * : LONGINT;
- topHoriz * : LONGINT;
- topVert * : LONGINT;
- attrList * : u.TagListPtr; (* Additional attributes *)
- END;
-
- (* DTM_WRITE *)
- Write * = RECORD (i.MsgBase)
- msg * : i.Msg;
- gInfo * : i.GadgetInfoPtr; (* Gadget information *)
- fileHandle * : d.FileHandlePtr; (* File handle to write to *)
- mode * : e.ULONG;
- attrList * : u.TagListPtr; (* Additional attributes *)
- END;
-
- CONST
-
- (* Save data as IFF data *)
- wmIff * = 0;
-
- (* Save data as local data format *)
- wmRaw * = 1;
-
- (*
- ** $VER: textclass.h 39.3 (3.8.92)
- **
- ** Interface definitions for DataType text objects.
- *)
-
- (*****************************************************************************)
-
- CONST
-
- textDTClass * = "text.datatype";
-
- (*****************************************************************************)
-
- CONST
-
- (* Text attributes *)
- buffer * = aDummy + 300;
- bufferLen * = aDummy + 301;
- lineList * = aDummy + 302;
- wordSelect * = aDummy + 303;
- wordDelim * = aDummy + 304;
- wordWrap * = aDummy + 305;
- (* Boolean. Should the text be word wrapped. Defaults to false. *)
-
- (*****************************************************************************)
-
- TYPE
-
- (* There is one Line structure for every line of text in our document. *)
- Line * = RECORD
- link * : e.MinNode; (* to link the lines together *)
- text * : e.LSTRPTR; (* pointer to the text for this line *)
- textLen * : e.ULONG; (* the character length of the text for this line *)
- xOffset * : e.UWORD; (* where in the line the text starts *)
- yOffset * : e.UWORD; (* line the text is on *)
- width * : e.UWORD; (* Width of line in pixels *)
- height * : e.UWORD; (* Height of line in pixels *)
- flags * : s.SET16; (* info on the line *)
- fgPen * : e.BYTE; (* foreground pen *)
- bgPen * : e.BYTE; (* background pen *)
- style * : LONGINT; (* Font style *)
- data * : e.APTR; (* Link data... *)
- END;
-
- (*****************************************************************************)
-
- (* Line.ln_Flags *)
-
- CONST
-
- (* Line Feed *)
- lf * = 0;
-
- (* Segment is a link *)
- link * = 1;
-
- (* ln_Data is a pointer to an DataTypes object *)
- object * = 2;
-
- (* Object is selected *)
- selected * = 3;
-
- (*****************************************************************************)
-
- CONST
-
- (* IFF types that may be text *)
- idFTXT * = 046545854H; (* MAKE_ID('F','T','X','T') *)
- idCHRS * = 043485253H; (* MAKE_ID('C','H','R','S') *)
-
- (*****************************************************************************)
-
- (*
- ** $VER: pictureclass.h 39.5 (28.4.93)
- **
- ** Interface definitions for DataType picture objects.
- *)
-
- (*****************************************************************************)
-
- CONST
-
- pictureDTClass * = "picture.datatype";
-
- (*****************************************************************************)
-
- CONST
-
- (* Picture attributes *)
- modeID * = aDummy + 200;
- (* Mode ID of the picture *)
-
- bitMapHeader * = aDummy + 201;
-
- bitMap * = aDummy + 202;
- (* Pointer to a class-allocated bitmap, that will end
- * up being freed by picture.class when DisposeDTObject()
- * is called *)
-
- colorRegisters * = aDummy + 203;
- cRegs * = aDummy + 204;
- gRegs * = aDummy + 205;
- colorTable * = aDummy + 206;
- colorTable2 * = aDummy + 207;
- allocated * = aDummy + 208;
- numColors * = aDummy + 209;
- numAlloc * = aDummy + 210;
-
- remap * = aDummy + 211;
- (* Boolean : Remap picture (defaults to TRUE) *)
-
- screen * = aDummy + 212;
- (* Screen to remap to *)
-
- freeSourceBitMap * = aDummy + 213;
- (* Boolean : Free the source bitmap after remapping *)
-
- grab * = aDummy + 214;
- (* Pointer to a Point structure *)
-
- destBitMap * = aDummy + 215;
- (* Pointer to the destination (remapped) bitmap *)
-
- classBitMap * = aDummy + 216;
- (* Pointer to class-allocated bitmap, that will end
- * up being freed by the class after DisposeDTObject()
- * is called *)
-
- numSparse * = aDummy + 217;
- (* (UWORD) Number of colors used for sparse remapping *)
-
- sparseTable * = aDummy + 218;
- (* (UBYTE * ) Pointer to a table of pen numbers indicating
- * which colors should be used when remapping the image.
- * This array must contain as many entries as there
- * are colors specified with PDTA_NumSparse *)
-
- (*****************************************************************************)
-
- CONST
-
- (* Masking techniques *)
- hasNone * = 0;
- hasMask * = 1;
- hasTransparentColor * = 2;
- lasso * = 3;
- hasAlpha * = 4;
-
- (* Compression techniques *)
- mpNone * = 0;
- mpByteRun1 * = 1;
- mpByteRun2 * = 2;
-
- TYPE
-
- (* Bitmap header (BMHD) structure *)
- BitMapHeader * = RECORD
- width * : e.UWORD; (* Width in pixels *)
- height * : e.UWORD; (* Height in pixels *)
- left * : INTEGER; (* Left position *)
- top * : INTEGER; (* Top position *)
- depth * : e.UBYTE; (* Number of planes *)
- masking * : e.UBYTE; (* Masking type *)
- compression * : e.UBYTE; (* Compression type *)
- pad * : e.UBYTE;
- transparent * : e.UWORD; (* Transparent color *)
- xAspect * : e.UBYTE;
- yAspect * : e.UBYTE;
- pageWidth * : INTEGER;
- pageHeight * : INTEGER;
- END;
-
- (*****************************************************************************)
-
- TYPE
-
- (* Color register structure *)
- ColorRegister * = RECORD
- red *, green *, blue * : e.UBYTE;
- END;
-
- (*****************************************************************************)
-
- CONST
-
- (* IFF types that may be in pictures *)
- idILBM * = 0494C424DH; (* MAKE_ID('I','L','B','M') *)
- idBMHD * = 0424D4844H; (* MAKE_ID('B','M','H','D') *)
- idBODY * = 0424F4459H; (* MAKE_ID('B','O','D','Y') *)
- idCMAP * = 0434D4150H; (* MAKE_ID('C','M','A','P') *)
- idCRNG * = 043524E47H; (* MAKE_ID('C','R','N','G') *)
- idGRAB * = 047524142H; (* MAKE_ID('G','R','A','B') *)
- idSPRT * = 053535254H; (* MAKE_ID('S','P','R','T') *)
- idDEST * = 044455354H; (* MAKE_ID('D','E','S','T') *)
- idCAMG * = 043414D47H; (* MAKE_ID('C','A','M','G') *)
-
- (*
- ** $VER: soundclass.h 39.3 (26.4.93)
- **
- ** Interface definitions for DataType sound objects.
- *)
-
- (*****************************************************************************)
-
- CONST
-
- soundDTClass * = "sound.datatype";
-
- (*****************************************************************************)
-
- CONST
-
- (* Sound attributes *)
- sdtaDummy * = aDummy + 500;
- voiceHeader * = sdtaDummy + 1;
- sample * = sdtaDummy + 2;
- (* (UBYTE * ) Sample data *)
-
- sampleLength * = sdtaDummy + 3;
- (* (ULONG) Length of the sample data in UBYTEs *)
-
- period * = sdtaDummy + 4;
- (* (UWORD) Period *)
-
- volume * = sdtaDummy + 5;
- (* (UWORD) Volume. Range from 0 to 64 *)
-
- cycles * = sdtaDummy + 6;
-
- (* The following tags are new for V40 *)
- signalTask * = sdtaDummy + 7;
- (* (struct Task * ) Task to signal when sound is complete or
- next buffer needed. *)
-
- signalBit * = sdtaDummy + 8;
- (* (BYTE) Signal bit to use on completion or -1 to disable *)
-
- continuous * = sdtaDummy + 9;
- (* (ULONG) Playing a continuous stream of data. Defaults to
- FALSe. *)
-
- (*****************************************************************************)
-
- CONST
-
- cmpNone * = 0;
- cmpFibDelta * = 1;
-
- TYPE
-
- VoiceHeader * = RECORD
- oneShotHiSamples * : e.ULONG;
- repeatHiSamples * : e.ULONG;
- samplesPerHiCycle * : e.ULONG;
- samplesPerSec * : e.UWORD;
- octaves * : e.UBYTE;
- compression * : e.UBYTE;
- volume * : e.ULONG;
- END;
-
- (*****************************************************************************)
-
- CONST
-
- (* IFF types *)
- id8SVX * = 038535658H; (* MAKE_ID('8','S','V','X') *)
- idVHDR * = 056484452H; (* MAKE_ID('V','H','D','R') *)
- (* idBODY * = 0424F4459H; (* MAKE_ID('B','O','D','Y') *) *)
-
- (*****************************************************************************)
-
- (*
- ** $VER: animationclass.h 40.1 (4.5.93)
- **
- ** Interface definitions for DataType animation objects.
- *)
-
- (*****************************************************************************)
-
- CONST
-
- animationDTClass * = "animation.datatype";
-
- (*****************************************************************************)
-
- CONST
-
- (* Animation attributes *)
- adtaDummy * = aDummy + 600;
- adtaModeID * = modeID;
- adtaKeyFrame * = bitMap;
- (* (struct BitMap * ) Key frame (first frame) bitmap *)
-
- adtaColorRegisters * = colorRegisters;
- adtaCRegs * = cRegs;
- adtaGRegs * = gRegs;
- adtaColorTable * = colorTable;
- adtaColorTable2 * = colorTable2;
- adtaAllocated * = allocated;
- adtaNumColors * = numColors;
- adtaNumAlloc * = numAlloc;
-
- adtaRemap * = remap;
- (* (BOOL) : Remap animation (defaults to TRUE) *)
-
- adtaScreen * = screen;
- (* (struct Screen * ) Screen to remap to *)
-
- adtaNumSparse * = numSparse;
- (* (UWORD) Number of colors used for sparse remapping *)
-
- adtaSparseTable * = sparseTable;
- (* (UBYTE * ) Pointer to a table of pen numbers indicating
- * which colors should be used when remapping the image.
- * This array must contain as many entries as there
- * are colors specified with ADTA_NumSparse *)
-
- adtaWidth * = adtaDummy + 1;
- adtaHeight * = adtaDummy + 2;
- adtaDepth * = adtaDummy + 3;
- adtaFrames * = adtaDummy + 4;
- (* (ULONG) Number of frames in the animation *)
-
- adtaFrame * = adtaDummy + 5;
- (* (ULONG) Current frame *)
-
- adtaFramesPerSecond * = adtaDummy + 6;
- (* (ULONG) Frames per second *)
-
- adtaFrameIncrement * = adtaDummy + 7;
- (* (LONG) Amount to change frame by when fast forwarding or
- * rewinding. Defaults to 10. *)
-
- (* Sound attributes *)
- adtaSample * = sample;
- adtaSampleLength * = sampleLength;
- adtaPeriod * = period;
- adtaVolume * = volume;
- adtaCycles * = cycles;
-
- (*****************************************************************************)
-
- CONST
-
- idANIM * = 0414E494DH; (* MAKE_ID('A','N','I','M') *)
- idANHD * = 0414E4844H; (* MAKE_ID('A','N','H','D') *)
- idDLTA * = 0444C5341H; (* MAKE_ID('D','L','T','A') *)
-
- (*****************************************************************************)
-
- TYPE
-
- (* Required ANHD structure describes an ANIM frame *)
- AnimHeader * = RECORD
- operation * : SHORTINT; (* The compression method:
- 0 set directly (normal ILBM BODY),
- 1 XOR ILBM mode,
- 2 Long Delta mode,
- 3 Short Delta mode,
- 4 Generalized short/long Delta mode,
- 5 Byte Vertical Delta mode
- 6 Stereo op 5 (third party)
- 74 (ascii 'J') reserved for Eric Graham's
- compression technique (details to be
- released later). *)
-
- mask * : s.SET8; (* (XOR mode only - plane mask where each
- bit is set =1 if there is data and =0
- if not.) *)
-
- width * : e.UWORD; (* (XOR mode only - width and height of the *)
- height * : e.UWORD; (* area represented by the BODY to eliminate *)
- (* unnecessary un-changed data *)
-
-
- left * : INTEGER; (* (XOR mode only - position of rectangular *)
- top * : INTEGER; (* area representd by the BODY) *)
-
-
- absTime * : e.ULONG; (* Timing for a frame relative to the time
- the first frame was displayed, in
- jiffies (1/60 sec) *)
-
- relTime * : e.ULONG; (* Timing for frame relative to time
- previous frame was displayed - in
- jiffies (1/60 sec) *)
-
- interleave * : SHORTINT; (* Indicates how may frames back this data is to
- modify. 0 defaults to indicate two frames back
- (for double buffering). n indicates n frames back.
- The main intent here is to allow values
- of 1 for special applications where
- frame data would modify the immediately
- previous frame. *)
-
- pad0 * : SHORTINT; (* Pad byte, not used at present. *)
-
- flags * : LONGINT; (* 32 option bits used by options=4 and 5.
- At present only 6 are identified, but the
- rest are set =0 so they can be used to
- implement future ideas. These are defined
- for option 4 only at this point. It is
- recommended that all bits be set =0 for
- option 5 and that any bit settings
- used in the future (such as for XOR mode)
- be compatible with the option 4
- bit settings. Player code should check
- undefined bits in options 4 and 5 to assure
- they are zero.
-
- The six bits for current use are:
-
- bit # set =0 set =1
- ===============================================
- 0 short data long data
- 1 set XOR
- 2 separate info one info list
- for each plane for all planes
- 3 not RLC RLC (run length coded)
- 4 horizontal vertical
- 5 short info offsets long info offsets
- *)
-
- pad * : ARRAY 16 OF e.UBYTE; (* This is a pad for future use for future
- compression modes. *)
- END;
-
- (*****************************************************************************)
-
- CONST
-
- adtmDummy * = 0700H;
-
- adtmLoadFrame * = 0701H;
- (* Used to load a frame of the animation *)
-
- adtmUnloadFrame * = 0702H;
- (* Used to unload a frame of the animation *)
-
- adtmStart * = 0703H;
- (* Used to start the animation *)
-
- adtmPause * = 0704H;
- (* Used to pause the animation (don't reset the timer) *)
-
- adtmStop * = 0705H;
- (* Used to stop the animation *)
-
- adtmLocate * = 0706H;
- (* Used to locate a frame in the animation (as set by a slider...) *)
-
- (*****************************************************************************)
-
- TYPE
-
- (* ADTM_LOADFRAME, ADTM_UNLOADFRAME *)
-
- ADTFrame * = RECORD (i.MsgBase)
- msg * : i.Msg;
- timeStamp * : e.ULONG; (* Timestamp of frame to load *)
-
- (* The following fields are filled in by the ADTM_LOADFRAME method, *)
- (* and are read-only for any other methods. *)
-
- frame * : e.ULONG; (* Frame number *)
- duration * : e.ULONG; (* Duration of frame *)
-
- bitMap * : gfx.BitMapPtr; (* Loaded BitMap *)
- cMap * : gfx.ColorMapPtr; (* Colormap, if changed *)
-
- sample * : e.APTR; (* Sound data *)
- sampleLength * : e.ULONG;
- period * : e.ULONG;
-
- userData * : e.APTR; (* Used by load frame for extra data *)
- END;
-
- (* ADTM_START, ADTM_PAUSE, ADTM_STOP, ADTM_LOCATE *)
- ADTStart * = RECORD (i.MsgBase)
- msg * : i.Msg;
- frame * : e.ULONG; (* Frame # to start at *)
- END;
-
- (*****************************************************************************)
-
-
- (* --- Library Base variable ------------------------------------------- *)
-
- CONST
-
- datatypesName * = "datatypes.library";
-
- VAR
-
- base* : e.LibraryPtr;
-
-
- (*-- Library Functions ------------------------------------------------*)
-
- TYPE (* Return type for GetDTMethods() *)
-
- MethodArrayPtr * = POINTER TO ARRAY 32767 OF LONGINT;
-
- (*--- functions in V40 or higher (Release 3.1) ---*)
-
- (* Public entries *)
-
- PROCEDURE ObtainDataTypeA* [base,-36]
- ( type [0] : e.ULONG;
- handle [8] : e.APTR;
- attrs [9] : ARRAY OF u.TagItem )
- : DataTypePtr;
-
- PROCEDURE ObtainDataType* [base,-36]
- ( type [0] : e.ULONG;
- handle [8] : e.APTR;
- attrs [9]..: u.Tag )
- : DataTypePtr;
-
- PROCEDURE ReleaseDataType* [base,-42]
- ( dt [8] : DataTypePtr );
-
- PROCEDURE NewDTObjectA* [base,-48]
- ( name [0] : ARRAY OF CHAR;
- attrs [8] : ARRAY OF u.TagItem )
- : i.ObjectPtr;
-
- PROCEDURE NewDTObject* [base,-48]
- ( name [0] : ARRAY OF CHAR;
- attrs [8]..: u.Tag )
- : i.ObjectPtr;
-
- PROCEDURE DisposeDTObject* [base,-54]
- ( o [8] : i.ObjectPtr );
-
- PROCEDURE SetDTAttrsA* [base,-60]
- ( o [8] : i.ObjectPtr;
- win [9] : i.WindowPtr;
- req [10] : i.RequesterPtr;
- attrs [11] : ARRAY OF u.TagItem )
- : e.ULONG;
-
- PROCEDURE SetDTAttrs* [base,-60]
- ( o [8] : i.ObjectPtr;
- win [9] : i.WindowPtr;
- req [10] : i.RequesterPtr;
- attrs [11]..: u.Tag )
- : e.ULONG;
-
- PROCEDURE GetDTAttrsA* [base,-66]
- ( o [8] : i.ObjectPtr;
- attrs [10] : ARRAY OF u.TagItem )
- : e.ULONG;
-
- PROCEDURE GetDTAttrs* [base,-66]
- ( o [8] : i.ObjectPtr;
- attrs [10]..: u.Tag )
- : e.ULONG;
-
- PROCEDURE AddDTObject* [base,-72]
- ( win [8] : i.WindowPtr;
- req [9] : i.RequesterPtr;
- o [10] : i.ObjectPtr;
- pos [0] : LONGINT )
- : LONGINT;
-
- PROCEDURE RefreshDTObjectA* [base,-78]
- ( o [8] : i.ObjectPtr;
- win [9] : i.WindowPtr;
- req [10] : i.RequesterPtr;
- attrs [11] : ARRAY OF u.TagItem );
-
- PROCEDURE RefreshDTObject* [base,-78]
- ( o [8] : i.ObjectPtr;
- win [9] : i.WindowPtr;
- req [10] : i.RequesterPtr;
- attrs [11]..: u.Tag );
-
- PROCEDURE DoAsyncLayout* [base,-84]
- ( o [8] : i.ObjectPtr;
- gpl [9] : i.LayoutPtr )
- : e.ULONG;
-
- PROCEDURE DoDTMethodA* [base,-90]
- ( o [8] : i.ObjectPtr;
- win [9] : i.WindowPtr;
- req [10] : i.RequesterPtr;
- VAR msg [11] : i.MsgBase )
- : e.ULONG;
-
- PROCEDURE DoDTMethod* [base,-90]
- ( o [8] : i.ObjectPtr;
- win [9] : i.WindowPtr;
- req [10] : i.RequesterPtr;
- msg [11]..: SYS.LONGWORD )
- : e.ULONG;
-
- PROCEDURE RemoveDTObject* [base,-96]
- ( win [8] : i.WindowPtr;
- o [9] : i.ObjectPtr )
- : LONGINT;
-
- PROCEDURE GetDTMethods* [base,-102]
- ( object [8] : i.ObjectPtr )
- : MethodArrayPtr;
-
- PROCEDURE GetDTTriggerMethods* [base,-108]
- ( object [8] : i.ObjectPtr )
- : MethodPtr;
-
- PROCEDURE PrintDTObjectA* [base,-114]
- ( o [8] : i.ObjectPtr;
- w [9] : i.WindowPtr;
- r [10] : i.RequesterPtr;
- VAR msg [11] : i.MsgBase )
- : e.ULONG;
-
- PROCEDURE PrintDTObject* [base,-114]
- ( o [8] : i.ObjectPtr;
- w [9] : i.WindowPtr;
- r [10] : i.RequesterPtr;
- msg [11]..: SYS.LONGWORD )
- : e.ULONG;
-
- PROCEDURE GetDTString* [base,-138]
- ( id [0] : e.ULONG )
- : e.LSTRPTR;
-
-
- (*-- Library Base variable --------------------------------------------*)
-
- <*$LongVars-*>
-
- (*-----------------------------------*)
- PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
-
- BEGIN (* CloseLib *)
- IF base # NIL THEN e.CloseLibrary (base) END
- END CloseLib;
-
- BEGIN
- base := e.OpenLibrary (datatypesName, e.libraryMinimum);
- IF base # NIL THEN Kernel.SetCleanup (CloseLib) END;
- END Datatypes.
-